--- chntpw-140201/ntreg.c.orig	2014-02-01 08:54:37.000000000 -0800
+++ chntpw-140201/ntreg.c	2018-07-02 16:10:39.625152640 -0700
@@ -1511,6 +1511,7 @@
   }
 
   strncpy(tmp,path,ABSPATHLEN-1);
+  tmp[ABSPATHLEN-1] = '\0';
 
   if (key->type & 0x20)
     keyname = mem_str(key->keyname, key->len_name);
